﻿#region Using directives

using System;
using System.Data;
using System.Data.Common;
using System.Collections;
using System.Collections.Generic;

using GPSTrackingServerDB.Entities;
using GPSTrackingServerDB.Data;

#endregion

namespace GPSTrackingServerDB.Data.Bases
{	
	///<summary>
	/// This class is the base class for any <see cref="AdminProviderBase"/> implementation.
	/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
	///</summary>
	public abstract partial class AdminProviderBaseCore : EntityProviderBase<GPSTrackingServerDB.Entities.Admin, GPSTrackingServerDB.Entities.AdminKey>
	{		
		#region Get from Many To Many Relationship Functions
		#region GetByAdminRoleIdFromAdminRolesByAdmin
		
		/// <summary>
		///		Gets Admin objects from the datasource by AdminRoleID in the
		///		AdminRolesByAdmin table. Table Admin is related to table AdminRoles
		///		through the (M:N) relationship defined in the AdminRolesByAdmin table.
		/// </summary>
		/// <param name="_adminRoleId"></param>
		/// <returns>Returns a typed collection of Admin objects.</returns>
		public TList<Admin> GetByAdminRoleIdFromAdminRolesByAdmin(System.Int32 _adminRoleId)
		{
			int count = -1;
			return GetByAdminRoleIdFromAdminRolesByAdmin(null,_adminRoleId, 0, int.MaxValue, out count);
			
		}
		
		/// <summary>
		///		Gets GPSTrackingServerDB.Entities.Admin objects from the datasource by AdminRoleID in the
		///		AdminRolesByAdmin table. Table Admin is related to table AdminRoles
		///		through the (M:N) relationship defined in the AdminRolesByAdmin table.
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="_adminRoleId"></param>
		/// <remarks></remarks>
		/// <returns>Returns a TList of Admin objects.</returns>
		public TList<Admin> GetByAdminRoleIdFromAdminRolesByAdmin(System.Int32 _adminRoleId, int start, int pageLength)
		{
			int count = -1;
			return GetByAdminRoleIdFromAdminRolesByAdmin(null, _adminRoleId, start, pageLength, out count);
		}
		
		/// <summary>
		///		Gets Admin objects from the datasource by AdminRoleID in the
		///		AdminRolesByAdmin table. Table Admin is related to table AdminRoles
		///		through the (M:N) relationship defined in the AdminRolesByAdmin table.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_adminRoleId"></param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of Admin objects.</returns>
		public TList<Admin> GetByAdminRoleIdFromAdminRolesByAdmin(TransactionManager transactionManager, System.Int32 _adminRoleId)
		{
			int count = -1;
			return GetByAdminRoleIdFromAdminRolesByAdmin(transactionManager, _adminRoleId, 0, int.MaxValue, out count);
		}
		
		
		/// <summary>
		///		Gets Admin objects from the datasource by AdminRoleID in the
		///		AdminRolesByAdmin table. Table Admin is related to table AdminRoles
		///		through the (M:N) relationship defined in the AdminRolesByAdmin table.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_adminRoleId"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		///  <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of Admin objects.</returns>
		public TList<Admin> GetByAdminRoleIdFromAdminRolesByAdmin(TransactionManager transactionManager, System.Int32 _adminRoleId,int start, int pageLength)
		{
			int count = -1;
			return GetByAdminRoleIdFromAdminRolesByAdmin(transactionManager, _adminRoleId, start, pageLength, out count);
		}
		
		/// <summary>
		///		Gets Admin objects from the datasource by AdminRoleID in the
		///		AdminRolesByAdmin table. Table Admin is related to table AdminRoles
		///		through the (M:N) relationship defined in the AdminRolesByAdmin table.
		/// </summary>
		/// <param name="_adminRoleId"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		///  <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">out parameter to get total records for query</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of Admin objects.</returns>
		public TList<Admin> GetByAdminRoleIdFromAdminRolesByAdmin(System.Int32 _adminRoleId,int start, int pageLength, out int count)
		{
			
			return GetByAdminRoleIdFromAdminRolesByAdmin(null, _adminRoleId, start, pageLength, out count);
		}


		/// <summary>
		///		Gets Admin objects from the datasource by AdminRoleID in the
		///		AdminRolesByAdmin table. Table Admin is related to table AdminRoles
		///		through the (M:N) relationship defined in the AdminRolesByAdmin table.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">out parameter to get total records for query</param>
		/// <param name="_adminRoleId"></param>
		/// <remarks></remarks>
		/// <returns>Returns a TList of Admin objects.</returns>
		public abstract TList<Admin> GetByAdminRoleIdFromAdminRolesByAdmin(TransactionManager transactionManager,System.Int32 _adminRoleId, int start, int pageLength, out int count);
		
		#endregion GetByAdminRoleIdFromAdminRolesByAdmin
		
		#endregion	
		
		#region Delete Methods

		/// <summary>
		/// 	Deletes a row from the DataSource.
		/// </summary>
		/// <param name="transactionManager">A <see cref="TransactionManager"/> object.</param>
		/// <param name="key">The unique identifier of the row to delete.</param>
		/// <returns>Returns true if operation suceeded.</returns>
		public override bool Delete(TransactionManager transactionManager, GPSTrackingServerDB.Entities.AdminKey key)
		{
			return Delete(transactionManager, key.AdminUsername);
		}
		
		/// <summary>
		/// 	Deletes a row from the DataSource.
		/// </summary>
		/// <param name="_adminUsername">. Primary Key.</param>
		/// <remarks>Deletes based on primary key(s).</remarks>
		/// <returns>Returns true if operation suceeded.</returns>
		public bool Delete(System.String _adminUsername)
		{
			return Delete(null, _adminUsername);
		}
		
		/// <summary>
		/// 	Deletes a row from the DataSource.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_adminUsername">. Primary Key.</param>
		/// <remarks>Deletes based on primary key(s).</remarks>
		/// <returns>Returns true if operation suceeded.</returns>
		public abstract bool Delete(TransactionManager transactionManager, System.String _adminUsername);		
		
		#endregion Delete Methods
		
		#region Get By Foreign Key Functions
	
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_Admin_Cities key.
		///		FK_Admin_Cities Description: 
		/// </summary>
		/// <param name="_cityId"></param>
		/// <returns>Returns a typed collection of GPSTrackingServerDB.Entities.Admin objects.</returns>
		public TList<Admin> GetByCityId(System.Int32? _cityId)
		{
			int count = -1;
			return GetByCityId(_cityId, 0,int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_Admin_Cities key.
		///		FK_Admin_Cities Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_cityId"></param>
		/// <returns>Returns a typed collection of GPSTrackingServerDB.Entities.Admin objects.</returns>
		/// <remarks></remarks>
		public TList<Admin> GetByCityId(TransactionManager transactionManager, System.Int32? _cityId)
		{
			int count = -1;
			return GetByCityId(transactionManager, _cityId, 0, int.MaxValue, out count);
		}
		
			/// <summary>
		/// 	Gets rows from the datasource based on the FK_Admin_Cities key.
		///		FK_Admin_Cities Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_cityId"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		///  <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of GPSTrackingServerDB.Entities.Admin objects.</returns>
		public TList<Admin> GetByCityId(TransactionManager transactionManager, System.Int32? _cityId, int start, int pageLength)
		{
			int count = -1;
			return GetByCityId(transactionManager, _cityId, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_Admin_Cities key.
		///		fkAdminCities Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="_cityId"></param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of GPSTrackingServerDB.Entities.Admin objects.</returns>
		public TList<Admin> GetByCityId(System.Int32? _cityId, int start, int pageLength)
		{
			int count =  -1;
			return GetByCityId(null, _cityId, start, pageLength,out count);	
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_Admin_Cities key.
		///		fkAdminCities Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="_cityId"></param>
		/// <param name="count">out parameter to get total records for query</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of GPSTrackingServerDB.Entities.Admin objects.</returns>
		public TList<Admin> GetByCityId(System.Int32? _cityId, int start, int pageLength,out int count)
		{
			return GetByCityId(null, _cityId, start, pageLength, out count);	
		}
						
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_Admin_Cities key.
		///		FK_Admin_Cities Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_cityId"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">The total number of records.</param>
		/// <returns>Returns a typed collection of GPSTrackingServerDB.Entities.Admin objects.</returns>
		public abstract TList<Admin> GetByCityId(TransactionManager transactionManager, System.Int32? _cityId, int start, int pageLength, out int count);
		
	
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_Admin_Countries key.
		///		FK_Admin_Countries Description: 
		/// </summary>
		/// <param name="_countryId"></param>
		/// <returns>Returns a typed collection of GPSTrackingServerDB.Entities.Admin objects.</returns>
		public TList<Admin> GetByCountryId(System.Int32 _countryId)
		{
			int count = -1;
			return GetByCountryId(_countryId, 0,int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_Admin_Countries key.
		///		FK_Admin_Countries Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_countryId"></param>
		/// <returns>Returns a typed collection of GPSTrackingServerDB.Entities.Admin objects.</returns>
		/// <remarks></remarks>
		public TList<Admin> GetByCountryId(TransactionManager transactionManager, System.Int32 _countryId)
		{
			int count = -1;
			return GetByCountryId(transactionManager, _countryId, 0, int.MaxValue, out count);
		}
		
			/// <summary>
		/// 	Gets rows from the datasource based on the FK_Admin_Countries key.
		///		FK_Admin_Countries Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_countryId"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		///  <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of GPSTrackingServerDB.Entities.Admin objects.</returns>
		public TList<Admin> GetByCountryId(TransactionManager transactionManager, System.Int32 _countryId, int start, int pageLength)
		{
			int count = -1;
			return GetByCountryId(transactionManager, _countryId, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_Admin_Countries key.
		///		fkAdminCountries Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="_countryId"></param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of GPSTrackingServerDB.Entities.Admin objects.</returns>
		public TList<Admin> GetByCountryId(System.Int32 _countryId, int start, int pageLength)
		{
			int count =  -1;
			return GetByCountryId(null, _countryId, start, pageLength,out count);	
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_Admin_Countries key.
		///		fkAdminCountries Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="_countryId"></param>
		/// <param name="count">out parameter to get total records for query</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of GPSTrackingServerDB.Entities.Admin objects.</returns>
		public TList<Admin> GetByCountryId(System.Int32 _countryId, int start, int pageLength,out int count)
		{
			return GetByCountryId(null, _countryId, start, pageLength, out count);	
		}
						
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_Admin_Countries key.
		///		FK_Admin_Countries Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_countryId"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">The total number of records.</param>
		/// <returns>Returns a typed collection of GPSTrackingServerDB.Entities.Admin objects.</returns>
		public abstract TList<Admin> GetByCountryId(TransactionManager transactionManager, System.Int32 _countryId, int start, int pageLength, out int count);
		
	
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_Admin_States key.
		///		FK_Admin_States Description: 
		/// </summary>
		/// <param name="_stateId"></param>
		/// <returns>Returns a typed collection of GPSTrackingServerDB.Entities.Admin objects.</returns>
		public TList<Admin> GetByStateId(System.Int32 _stateId)
		{
			int count = -1;
			return GetByStateId(_stateId, 0,int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_Admin_States key.
		///		FK_Admin_States Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_stateId"></param>
		/// <returns>Returns a typed collection of GPSTrackingServerDB.Entities.Admin objects.</returns>
		/// <remarks></remarks>
		public TList<Admin> GetByStateId(TransactionManager transactionManager, System.Int32 _stateId)
		{
			int count = -1;
			return GetByStateId(transactionManager, _stateId, 0, int.MaxValue, out count);
		}
		
			/// <summary>
		/// 	Gets rows from the datasource based on the FK_Admin_States key.
		///		FK_Admin_States Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_stateId"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		///  <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of GPSTrackingServerDB.Entities.Admin objects.</returns>
		public TList<Admin> GetByStateId(TransactionManager transactionManager, System.Int32 _stateId, int start, int pageLength)
		{
			int count = -1;
			return GetByStateId(transactionManager, _stateId, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_Admin_States key.
		///		fkAdminStates Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="_stateId"></param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of GPSTrackingServerDB.Entities.Admin objects.</returns>
		public TList<Admin> GetByStateId(System.Int32 _stateId, int start, int pageLength)
		{
			int count =  -1;
			return GetByStateId(null, _stateId, start, pageLength,out count);	
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_Admin_States key.
		///		fkAdminStates Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="_stateId"></param>
		/// <param name="count">out parameter to get total records for query</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of GPSTrackingServerDB.Entities.Admin objects.</returns>
		public TList<Admin> GetByStateId(System.Int32 _stateId, int start, int pageLength,out int count)
		{
			return GetByStateId(null, _stateId, start, pageLength, out count);	
		}
						
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_Admin_States key.
		///		FK_Admin_States Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_stateId"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">The total number of records.</param>
		/// <returns>Returns a typed collection of GPSTrackingServerDB.Entities.Admin objects.</returns>
		public abstract TList<Admin> GetByStateId(TransactionManager transactionManager, System.Int32 _stateId, int start, int pageLength, out int count);
		
		#endregion

		#region Get By Index Functions
		
		/// <summary>
		/// 	Gets a row from the DataSource based on its primary key.
		/// </summary>
		/// <param name="transactionManager">A <see cref="TransactionManager"/> object.</param>
		/// <param name="key">The unique identifier of the row to retrieve.</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <returns>Returns an instance of the Entity class.</returns>
		public override GPSTrackingServerDB.Entities.Admin Get(TransactionManager transactionManager, GPSTrackingServerDB.Entities.AdminKey key, int start, int pageLength)
		{
			return GetByAdminUsername(transactionManager, key.AdminUsername, start, pageLength);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the primary key PK_AdminUsers index.
		/// </summary>
		/// <param name="_adminUsername"></param>
		/// <returns>Returns an instance of the <see cref="GPSTrackingServerDB.Entities.Admin"/> class.</returns>
		public GPSTrackingServerDB.Entities.Admin GetByAdminUsername(System.String _adminUsername)
		{
			int count = -1;
			return GetByAdminUsername(null,_adminUsername, 0, int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the PK_AdminUsers index.
		/// </summary>
		/// <param name="_adminUsername"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="GPSTrackingServerDB.Entities.Admin"/> class.</returns>
		public GPSTrackingServerDB.Entities.Admin GetByAdminUsername(System.String _adminUsername, int start, int pageLength)
		{
			int count = -1;
			return GetByAdminUsername(null, _adminUsername, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the PK_AdminUsers index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_adminUsername"></param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="GPSTrackingServerDB.Entities.Admin"/> class.</returns>
		public GPSTrackingServerDB.Entities.Admin GetByAdminUsername(TransactionManager transactionManager, System.String _adminUsername)
		{
			int count = -1;
			return GetByAdminUsername(transactionManager, _adminUsername, 0, int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the PK_AdminUsers index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_adminUsername"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="GPSTrackingServerDB.Entities.Admin"/> class.</returns>
		public GPSTrackingServerDB.Entities.Admin GetByAdminUsername(TransactionManager transactionManager, System.String _adminUsername, int start, int pageLength)
		{
			int count = -1;
			return GetByAdminUsername(transactionManager, _adminUsername, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the PK_AdminUsers index.
		/// </summary>
		/// <param name="_adminUsername"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">out parameter to get total records for query</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="GPSTrackingServerDB.Entities.Admin"/> class.</returns>
		public GPSTrackingServerDB.Entities.Admin GetByAdminUsername(System.String _adminUsername, int start, int pageLength, out int count)
		{
			return GetByAdminUsername(null, _adminUsername, start, pageLength, out count);
		}
		
				
		/// <summary>
		/// 	Gets rows from the datasource based on the PK_AdminUsers index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_adminUsername"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">The total number of records.</param>
		/// <returns>Returns an instance of the <see cref="GPSTrackingServerDB.Entities.Admin"/> class.</returns>
		public abstract GPSTrackingServerDB.Entities.Admin GetByAdminUsername(TransactionManager transactionManager, System.String _adminUsername, int start, int pageLength, out int count);
						
		#endregion "Get By Index Functions"
	
		#region Custom Methods
		
		
		#endregion

		#region Helper Functions	
		
		/// <summary>
		/// Fill a TList&lt;Admin&gt; From a DataReader.
		/// </summary>
		/// <param name="reader">Datareader</param>
		/// <param name="rows">The collection to fill</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">number of rows.</param>
		/// <returns>a <see cref="TList&lt;Admin&gt;"/></returns>
		public static TList<Admin> Fill(IDataReader reader, TList<Admin> rows, int start, int pageLength)
		{
			NetTiersProvider currentProvider = DataRepository.Provider;
            bool useEntityFactory = currentProvider.UseEntityFactory;
            bool enableEntityTracking = currentProvider.EnableEntityTracking;
            LoadPolicy currentLoadPolicy = currentProvider.CurrentLoadPolicy;
			Type entityCreationFactoryType = currentProvider.EntityCreationalFactoryType;
			
			// advance to the starting row
			for (int i = 0; i < start; i++)
			{
				if (!reader.Read())
				return rows; // not enough rows, just return
			}
			for (int i = 0; i < pageLength; i++)
			{
				if (!reader.Read())
					break; // we are done
					
				string key = null;
				
				GPSTrackingServerDB.Entities.Admin c = null;
				if (useEntityFactory)
				{
					key = new System.Text.StringBuilder("Admin")
					.Append("|").Append((System.String)reader[((int)AdminColumn.AdminUsername - 1)]).ToString();
					c = EntityManager.LocateOrCreate<Admin>(
					key.ToString(), // EntityTrackingKey
					"Admin",  //Creational Type
					entityCreationFactoryType,  //Factory used to create entity
					enableEntityTracking); // Track this entity?
				}
				else
				{
					c = new GPSTrackingServerDB.Entities.Admin();
				}
				
				if (!enableEntityTracking ||
					c.EntityState == EntityState.Added ||
					(enableEntityTracking &&
					
						(
							(currentLoadPolicy == LoadPolicy.PreserveChanges && c.EntityState == EntityState.Unchanged) ||
							(currentLoadPolicy == LoadPolicy.DiscardChanges && c.EntityState != EntityState.Unchanged)
						)
					))
				{
					c.SuppressEntityEvents = true;
					c.AdminUsername = (System.String)reader[((int)AdminColumn.AdminUsername - 1)];
					c.OriginalAdminUsername = c.AdminUsername;
					c.Password = (System.String)reader[((int)AdminColumn.Password - 1)];
					c.Identification = (System.Decimal)reader[((int)AdminColumn.Identification - 1)];
					c.Name = (System.String)reader[((int)AdminColumn.Name - 1)];
					c.FirstName = (System.String)reader[((int)AdminColumn.FirstName - 1)];
					c.LastName = (System.String)reader[((int)AdminColumn.LastName - 1)];
					c.CountryId = (System.Int32)reader[((int)AdminColumn.CountryId - 1)];
					c.StateId = (System.Int32)reader[((int)AdminColumn.StateId - 1)];
					c.CityId = (reader.IsDBNull(((int)AdminColumn.CityId - 1)))?null:(System.Int32?)reader[((int)AdminColumn.CityId - 1)];
					c.Phone = (reader.IsDBNull(((int)AdminColumn.Phone - 1)))?null:(System.Decimal?)reader[((int)AdminColumn.Phone - 1)];
					c.Mobile = (reader.IsDBNull(((int)AdminColumn.Mobile - 1)))?null:(System.Decimal?)reader[((int)AdminColumn.Mobile - 1)];
					c.Email = (reader.IsDBNull(((int)AdminColumn.Email - 1)))?null:(System.String)reader[((int)AdminColumn.Email - 1)];
					c.IsActive = (System.Boolean)reader[((int)AdminColumn.IsActive - 1)];
					c.CreationDate = (reader.IsDBNull(((int)AdminColumn.CreationDate - 1)))?null:(System.DateTime?)reader[((int)AdminColumn.CreationDate - 1)];
					c.EntityTrackingKey = key;
					c.AcceptChanges();
					c.SuppressEntityEvents = false;
				}
				rows.Add(c);
			}
		return rows;
		}		
		/// <summary>
		/// Refreshes the <see cref="GPSTrackingServerDB.Entities.Admin"/> object from the <see cref="IDataReader"/>.
		/// </summary>
		/// <param name="reader">The <see cref="IDataReader"/> to read from.</param>
		/// <param name="entity">The <see cref="GPSTrackingServerDB.Entities.Admin"/> object to refresh.</param>
		public static void RefreshEntity(IDataReader reader, GPSTrackingServerDB.Entities.Admin entity)
		{
			if (!reader.Read()) return;
			
			entity.AdminUsername = (System.String)reader[((int)AdminColumn.AdminUsername - 1)];
			entity.OriginalAdminUsername = (System.String)reader["AdminUsername"];
			entity.Password = (System.String)reader[((int)AdminColumn.Password - 1)];
			entity.Identification = (System.Decimal)reader[((int)AdminColumn.Identification - 1)];
			entity.Name = (System.String)reader[((int)AdminColumn.Name - 1)];
			entity.FirstName = (System.String)reader[((int)AdminColumn.FirstName - 1)];
			entity.LastName = (System.String)reader[((int)AdminColumn.LastName - 1)];
			entity.CountryId = (System.Int32)reader[((int)AdminColumn.CountryId - 1)];
			entity.StateId = (System.Int32)reader[((int)AdminColumn.StateId - 1)];
			entity.CityId = (reader.IsDBNull(((int)AdminColumn.CityId - 1)))?null:(System.Int32?)reader[((int)AdminColumn.CityId - 1)];
			entity.Phone = (reader.IsDBNull(((int)AdminColumn.Phone - 1)))?null:(System.Decimal?)reader[((int)AdminColumn.Phone - 1)];
			entity.Mobile = (reader.IsDBNull(((int)AdminColumn.Mobile - 1)))?null:(System.Decimal?)reader[((int)AdminColumn.Mobile - 1)];
			entity.Email = (reader.IsDBNull(((int)AdminColumn.Email - 1)))?null:(System.String)reader[((int)AdminColumn.Email - 1)];
			entity.IsActive = (System.Boolean)reader[((int)AdminColumn.IsActive - 1)];
			entity.CreationDate = (reader.IsDBNull(((int)AdminColumn.CreationDate - 1)))?null:(System.DateTime?)reader[((int)AdminColumn.CreationDate - 1)];
			entity.AcceptChanges();
		}
		
		/// <summary>
		/// Refreshes the <see cref="GPSTrackingServerDB.Entities.Admin"/> object from the <see cref="DataSet"/>.
		/// </summary>
		/// <param name="dataSet">The <see cref="DataSet"/> to read from.</param>
		/// <param name="entity">The <see cref="GPSTrackingServerDB.Entities.Admin"/> object.</param>
		public static void RefreshEntity(DataSet dataSet, GPSTrackingServerDB.Entities.Admin entity)
		{
			DataRow dataRow = dataSet.Tables[0].Rows[0];
			
			entity.AdminUsername = (System.String)dataRow["AdminUsername"];
			entity.OriginalAdminUsername = (System.String)dataRow["AdminUsername"];
			entity.Password = (System.String)dataRow["Password"];
			entity.Identification = (System.Decimal)dataRow["Identification"];
			entity.Name = (System.String)dataRow["Name"];
			entity.FirstName = (System.String)dataRow["FirstName"];
			entity.LastName = (System.String)dataRow["LastName"];
			entity.CountryId = (System.Int32)dataRow["CountryID"];
			entity.StateId = (System.Int32)dataRow["StateID"];
			entity.CityId = Convert.IsDBNull(dataRow["CityID"]) ? null : (System.Int32?)dataRow["CityID"];
			entity.Phone = Convert.IsDBNull(dataRow["Phone"]) ? null : (System.Decimal?)dataRow["Phone"];
			entity.Mobile = Convert.IsDBNull(dataRow["Mobile"]) ? null : (System.Decimal?)dataRow["Mobile"];
			entity.Email = Convert.IsDBNull(dataRow["Email"]) ? null : (System.String)dataRow["Email"];
			entity.IsActive = (System.Boolean)dataRow["IsActive"];
			entity.CreationDate = Convert.IsDBNull(dataRow["CreationDate"]) ? null : (System.DateTime?)dataRow["CreationDate"];
			entity.AcceptChanges();
		}
		#endregion 
		
		#region DeepLoad Methods
		/// <summary>
		/// Deep Loads the <see cref="IEntity"/> object with criteria based of the child 
		/// property collections only N Levels Deep based on the <see cref="DeepLoadType"/>.
		/// </summary>
		/// <remarks>
		/// Use this method with caution as it is possible to DeepLoad with Recursion and traverse an entire object graph.
		/// </remarks>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="entity">The <see cref="GPSTrackingServerDB.Entities.Admin"/> object to load.</param>
		/// <param name="deep">Boolean. A flag that indicates whether to recursively save all Property Collection that are descendants of this instance. If True, saves the complete object graph below this object. If False, saves this object only. </param>
		/// <param name="deepLoadType">DeepLoadType Enumeration to Include/Exclude object property collections from Load.</param>
		/// <param name="childTypes">GPSTrackingServerDB.Entities.Admin Property Collection Type Array To Include or Exclude from Load</param>
		/// <param name="innerList">A collection of child types for easy access.</param>
	    /// <exception cref="ArgumentNullException">entity or childTypes is null.</exception>
	    /// <exception cref="ArgumentException">deepLoadType has invalid value.</exception>
		public override void DeepLoad(TransactionManager transactionManager, GPSTrackingServerDB.Entities.Admin entity, bool deep, DeepLoadType deepLoadType, System.Type[] childTypes, DeepSession innerList)
		{
			if(entity == null)
				return;

			#region CityIdSource	
			if (CanDeepLoad(entity, "Cities|CityIdSource", deepLoadType, innerList) 
				&& entity.CityIdSource == null)
			{
				object[] pkItems = new object[1];
				pkItems[0] = (entity.CityId ?? (int)0);
				Cities tmpEntity = EntityManager.LocateEntity<Cities>(EntityLocator.ConstructKeyFromPkItems(typeof(Cities), pkItems), DataRepository.Provider.EnableEntityTracking);
				if (tmpEntity != null)
					entity.CityIdSource = tmpEntity;
				else
					entity.CityIdSource = DataRepository.CitiesProvider.GetByCityId(transactionManager, (entity.CityId ?? (int)0));		
				
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'CityIdSource' loaded. key " + entity.EntityTrackingKey);
				#endif 
				
				if (deep && entity.CityIdSource != null)
				{
					innerList.SkipChildren = true;
					DataRepository.CitiesProvider.DeepLoad(transactionManager, entity.CityIdSource, deep, deepLoadType, childTypes, innerList);
					innerList.SkipChildren = false;
				}
					
			}
			#endregion CityIdSource

			#region CountryIdSource	
			if (CanDeepLoad(entity, "Countries|CountryIdSource", deepLoadType, innerList) 
				&& entity.CountryIdSource == null)
			{
				object[] pkItems = new object[1];
				pkItems[0] = entity.CountryId;
				Countries tmpEntity = EntityManager.LocateEntity<Countries>(EntityLocator.ConstructKeyFromPkItems(typeof(Countries), pkItems), DataRepository.Provider.EnableEntityTracking);
				if (tmpEntity != null)
					entity.CountryIdSource = tmpEntity;
				else
					entity.CountryIdSource = DataRepository.CountriesProvider.GetByCountryId(transactionManager, entity.CountryId);		
				
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'CountryIdSource' loaded. key " + entity.EntityTrackingKey);
				#endif 
				
				if (deep && entity.CountryIdSource != null)
				{
					innerList.SkipChildren = true;
					DataRepository.CountriesProvider.DeepLoad(transactionManager, entity.CountryIdSource, deep, deepLoadType, childTypes, innerList);
					innerList.SkipChildren = false;
				}
					
			}
			#endregion CountryIdSource

			#region StateIdSource	
			if (CanDeepLoad(entity, "States|StateIdSource", deepLoadType, innerList) 
				&& entity.StateIdSource == null)
			{
				object[] pkItems = new object[1];
				pkItems[0] = entity.StateId;
				States tmpEntity = EntityManager.LocateEntity<States>(EntityLocator.ConstructKeyFromPkItems(typeof(States), pkItems), DataRepository.Provider.EnableEntityTracking);
				if (tmpEntity != null)
					entity.StateIdSource = tmpEntity;
				else
					entity.StateIdSource = DataRepository.StatesProvider.GetByStateId(transactionManager, entity.StateId);		
				
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'StateIdSource' loaded. key " + entity.EntityTrackingKey);
				#endif 
				
				if (deep && entity.StateIdSource != null)
				{
					innerList.SkipChildren = true;
					DataRepository.StatesProvider.DeepLoad(transactionManager, entity.StateIdSource, deep, deepLoadType, childTypes, innerList);
					innerList.SkipChildren = false;
				}
					
			}
			#endregion StateIdSource
			
			//used to hold DeepLoad method delegates and fire after all the local children have been loaded.
			Dictionary<string, KeyValuePair<Delegate, object>> deepHandles = new Dictionary<string, KeyValuePair<Delegate, object>>();
			// Deep load child collections  - Call GetByAdminUsername methods when available
			
			#region AdminRoleIdAdminRolesCollection_From_AdminRolesByAdmin
			// RelationshipType.ManyToMany
			if (CanDeepLoad(entity, "List<AdminRoles>|AdminRoleIdAdminRolesCollection_From_AdminRolesByAdmin", deepLoadType, innerList))
			{
				entity.AdminRoleIdAdminRolesCollection_From_AdminRolesByAdmin = DataRepository.AdminRolesProvider.GetByAdminUsernameFromAdminRolesByAdmin(transactionManager, entity.AdminUsername);			 
		
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'AdminRoleIdAdminRolesCollection_From_AdminRolesByAdmin' loaded. key " + entity.EntityTrackingKey);
				#endif 
				
				if (deep && entity.AdminRoleIdAdminRolesCollection_From_AdminRolesByAdmin != null)
				{
					deepHandles.Add("AdminRoleIdAdminRolesCollection_From_AdminRolesByAdmin",
						new KeyValuePair<Delegate, object>((DeepLoadHandle< AdminRoles >) DataRepository.AdminRolesProvider.DeepLoad,
						new object[] { transactionManager, entity.AdminRoleIdAdminRolesCollection_From_AdminRolesByAdmin, deep, deepLoadType, childTypes, innerList }
					));
				}
			}
			#endregion
			
			
			
			#region AdminRolesByAdminCollection
			//Relationship Type One : Many
			if (CanDeepLoad(entity, "List<AdminRolesByAdmin>|AdminRolesByAdminCollection", deepLoadType, innerList)) 
			{
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'AdminRolesByAdminCollection' loaded. key " + entity.EntityTrackingKey);
				#endif 

				entity.AdminRolesByAdminCollection = DataRepository.AdminRolesByAdminProvider.GetByAdminUsername(transactionManager, entity.AdminUsername);

				if (deep && entity.AdminRolesByAdminCollection.Count > 0)
				{
					deepHandles.Add("AdminRolesByAdminCollection",
						new KeyValuePair<Delegate, object>((DeepLoadHandle<AdminRolesByAdmin>) DataRepository.AdminRolesByAdminProvider.DeepLoad,
						new object[] { transactionManager, entity.AdminRolesByAdminCollection, deep, deepLoadType, childTypes, innerList }
					));
				}
			}		
			#endregion 
			
			
			//Fire all DeepLoad Items
			foreach(KeyValuePair<Delegate, object> pair in deepHandles.Values)
		    {
                pair.Key.DynamicInvoke((object[])pair.Value);
		    }
			deepHandles = null;
		}
		
		#endregion 
		
		#region DeepSave Methods

		/// <summary>
		/// Deep Save the entire object graph of the GPSTrackingServerDB.Entities.Admin object with criteria based of the child 
		/// Type property array and DeepSaveType.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="entity">GPSTrackingServerDB.Entities.Admin instance</param>
		/// <param name="deepSaveType">DeepSaveType Enumeration to Include/Exclude object property collections from Save.</param>
		/// <param name="childTypes">GPSTrackingServerDB.Entities.Admin Property Collection Type Array To Include or Exclude from Save</param>
		/// <param name="innerList">A Hashtable of child types for easy access.</param>
		public override bool DeepSave(TransactionManager transactionManager, GPSTrackingServerDB.Entities.Admin entity, DeepSaveType deepSaveType, System.Type[] childTypes, DeepSession innerList)
		{	
			if (entity == null)
				return false;
							
			#region Composite Parent Properties
			//Save Source Composite Properties, however, don't call deep save on them.  
			//So they only get saved a single level deep.
			
			#region CityIdSource
			if (CanDeepSave(entity, "Cities|CityIdSource", deepSaveType, innerList) 
				&& entity.CityIdSource != null)
			{
				DataRepository.CitiesProvider.Save(transactionManager, entity.CityIdSource);
				entity.CityId = entity.CityIdSource.CityId;
			}
			#endregion 
			
			#region CountryIdSource
			if (CanDeepSave(entity, "Countries|CountryIdSource", deepSaveType, innerList) 
				&& entity.CountryIdSource != null)
			{
				DataRepository.CountriesProvider.Save(transactionManager, entity.CountryIdSource);
				entity.CountryId = entity.CountryIdSource.CountryId;
			}
			#endregion 
			
			#region StateIdSource
			if (CanDeepSave(entity, "States|StateIdSource", deepSaveType, innerList) 
				&& entity.StateIdSource != null)
			{
				DataRepository.StatesProvider.Save(transactionManager, entity.StateIdSource);
				entity.StateId = entity.StateIdSource.StateId;
			}
			#endregion 
			#endregion Composite Parent Properties

			// Save Root Entity through Provider
			if (!entity.IsDeleted)
				this.Save(transactionManager, entity);
			
			//used to hold DeepSave method delegates and fire after all the local children have been saved.
			Dictionary<string, KeyValuePair<Delegate, object>> deepHandles = new Dictionary<string, KeyValuePair<Delegate, object>>();

			#region AdminRoleIdAdminRolesCollection_From_AdminRolesByAdmin>
			if (CanDeepSave(entity.AdminRoleIdAdminRolesCollection_From_AdminRolesByAdmin, "List<AdminRoles>|AdminRoleIdAdminRolesCollection_From_AdminRolesByAdmin", deepSaveType, innerList))
			{
				if (entity.AdminRoleIdAdminRolesCollection_From_AdminRolesByAdmin.Count > 0 || entity.AdminRoleIdAdminRolesCollection_From_AdminRolesByAdmin.DeletedItems.Count > 0)
				{
					DataRepository.AdminRolesProvider.Save(transactionManager, entity.AdminRoleIdAdminRolesCollection_From_AdminRolesByAdmin); 
					deepHandles.Add("AdminRoleIdAdminRolesCollection_From_AdminRolesByAdmin",
						new KeyValuePair<Delegate, object>((DeepSaveHandle<AdminRoles>) DataRepository.AdminRolesProvider.DeepSave,
						new object[] { transactionManager, entity.AdminRoleIdAdminRolesCollection_From_AdminRolesByAdmin, deepSaveType, childTypes, innerList }
					));
				}
			}
			#endregion 
	
			#region List<AdminRolesByAdmin>
				if (CanDeepSave(entity.AdminRolesByAdminCollection, "List<AdminRolesByAdmin>|AdminRolesByAdminCollection", deepSaveType, innerList)) 
				{	
					// update each child parent id with the real parent id (mostly used on insert)
					foreach(AdminRolesByAdmin child in entity.AdminRolesByAdminCollection)
					{
						if(child.AdminUsernameSource != null)
						{
								child.AdminUsername = child.AdminUsernameSource.AdminUsername;
						}

						if(child.AdminRoleIdSource != null)
						{
								child.AdminRoleId = child.AdminRoleIdSource.AdminRoleId;
						}

					}

					if (entity.AdminRolesByAdminCollection.Count > 0 || entity.AdminRolesByAdminCollection.DeletedItems.Count > 0)
					{
						//DataRepository.AdminRolesByAdminProvider.Save(transactionManager, entity.AdminRolesByAdminCollection);
						
						deepHandles.Add("AdminRolesByAdminCollection",
						new KeyValuePair<Delegate, object>((DeepSaveHandle< AdminRolesByAdmin >) DataRepository.AdminRolesByAdminProvider.DeepSave,
							new object[] { transactionManager, entity.AdminRolesByAdminCollection, deepSaveType, childTypes, innerList }
						));
					}
				} 
			#endregion 
				
			//Fire all DeepSave Items
			foreach(KeyValuePair<Delegate, object> pair in deepHandles.Values)
		    {
                pair.Key.DynamicInvoke((object[])pair.Value);
		    }
			
			// Save Root Entity through Provider, if not already saved in delete mode
			if (entity.IsDeleted)
				this.Save(transactionManager, entity);
				

			deepHandles = null;
						
			return true;
		}
		#endregion
	} // end class
	
	#region AdminChildEntityTypes
	
	///<summary>
	/// Enumeration used to expose the different child entity types 
	/// for child properties in <c>GPSTrackingServerDB.Entities.Admin</c>
	///</summary>
	public enum AdminChildEntityTypes
	{
		
		///<summary>
		/// Composite Property for <c>Cities</c> at CityIdSource
		///</summary>
		[ChildEntityType(typeof(Cities))]
		Cities,
		
		///<summary>
		/// Composite Property for <c>Countries</c> at CountryIdSource
		///</summary>
		[ChildEntityType(typeof(Countries))]
		Countries,
		
		///<summary>
		/// Composite Property for <c>States</c> at StateIdSource
		///</summary>
		[ChildEntityType(typeof(States))]
		States,
		///<summary>
		/// Collection of <c>Admin</c> as ManyToMany for AdminRolesCollection_From_AdminRolesByAdmin
		///</summary>
		[ChildEntityType(typeof(TList<AdminRoles>))]
		AdminRoleIdAdminRolesCollection_From_AdminRolesByAdmin,
		///<summary>
		/// Collection of <c>Admin</c> as OneToMany for AdminRolesByAdminCollection
		///</summary>
		[ChildEntityType(typeof(TList<AdminRolesByAdmin>))]
		AdminRolesByAdminCollection,
	}
	
	#endregion AdminChildEntityTypes
	
	#region AdminFilterBuilder
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;AdminColumn&gt;"/> class
	/// that is used exclusively with a <see cref="Admin"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class AdminFilterBuilder : SqlFilterBuilder<AdminColumn>
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the AdminFilterBuilder class.
		/// </summary>
		public AdminFilterBuilder() : base() { }

		/// <summary>
		/// Initializes a new instance of the AdminFilterBuilder class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public AdminFilterBuilder(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the AdminFilterBuilder class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public AdminFilterBuilder(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion AdminFilterBuilder
	
	#region AdminParameterBuilder
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ParameterizedSqlFilterBuilder&lt;AdminColumn&gt;"/> class
	/// that is used exclusively with a <see cref="Admin"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class AdminParameterBuilder : ParameterizedSqlFilterBuilder<AdminColumn>
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the AdminParameterBuilder class.
		/// </summary>
		public AdminParameterBuilder() : base() { }

		/// <summary>
		/// Initializes a new instance of the AdminParameterBuilder class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public AdminParameterBuilder(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the AdminParameterBuilder class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public AdminParameterBuilder(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion AdminParameterBuilder
	
	#region AdminSortBuilder
    
    /// <summary>
    /// A strongly-typed instance of the <see cref="SqlSortBuilder&lt;AdminColumn&gt;"/> class
	/// that is used exclusively with a <see cref="Admin"/> object.
    /// </summary>
    [CLSCompliant(true)]
    public class AdminSortBuilder : SqlSortBuilder<AdminColumn>
    {
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the AdminSqlSortBuilder class.
		/// </summary>
		public AdminSortBuilder() : base() { }

		#endregion Constructors

    }    
    #endregion AdminSortBuilder
	
} // end namespace
